#include <iostream>
#include "AutoCallbackChain.h"

using namespace std;

class PrintHello:
	public TimeCallbackImpl
{
public:
	PrintHello():TimeCallbackImpl(5){
		cout << "程序开始运行:" << endl;
	}

	~PrintHello(){
		cout << "结束了." << endl;
	}
	int callback() override{
		cout << "\tHello, World!" << endl;
	} 
};

int main()
{
	AutoCallbackChain CBC;
	CBC.append(new PrintHello());
	CBC.Run();
	return 0;
}
